<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <div th:if="${#maps.isEmpty(packageCourseListMap)}">
        <div class="noDataTipsBox">
            <p><span class="c-4e fs16">亲，套餐没有设置课程数据~~~</span></p>
        </div>
    </div>
    <div th:if="!${#maps.isEmpty(packageCourseListMap)}">
        <div class="pt10" th:if="!${#lists.isEmpty(packageCourseListMap[1])}">
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th class="text-center" width="10%">课程ID</th>
                        <th class="text-center" width="18%">课程名称</th>
                        <th class="text-center" width="18%">课程价格</th>
                        <th class="text-center" width="18%">课程状态</th>
                        <th class="text-center" width="18%">必选课</th>
                        <th class="text-center" width="18%">排序</th>
                        <th class="text-center" width="18%">操作</th>
                    </tr>
                    </thead>
                </table>
                <div class="J_V_tabContent table-xScrollWrap">
                    <table class="table table-bordered table-hover table-xs-content">
                        <tbody>
                        <tr class="jqgfirstrow" role="row">
                            <th class="text-center" width="10%"></th>
                            <th class="text-center" width="18%"></th>
                            <th class="text-center" width="18%"></th>
                            <th class="text-center" width="18%"></th>
                            <th class="text-center" width="18%"></th>
                            <th class="text-center" width="18%"></th>
                            <th class="text-center" width="18%"></th>
                        </tr>
                        <tr th:each="pkgCourse : ${packageCourseListMap[1]}">
                            <td class="text-center" th:text="${pkgCourse['course']['id']}"></td>
                            <td class="text-center" th:text="${pkgCourse['course']['courseName']}" th:attrappend="id='pkg-coursename-'+${pkgCourse['id']}"></td>
                            <td class="text-center">
                                <span class="pie" th:text="${pkgCourse['price']}" th:attrappend="id='pkg-price-'+${pkgCourse['id']}"></span>
                            </td>
                            <td class="text-center">
                                <span th:if="${pkgCourse['course']['status']}==1">正常</span>
                                <span th:if="${pkgCourse['course']['status']}==2">冻结</span>
                                <span th:if="${pkgCourse['course']['status']}==3">删除</span>
                            </td>
                            <td class="text-center" th:text="${pkgCourse['required']}==1?'是':'否'" th:attrappend="id='pkg-required-'+${pkgCourse['id']}"></td>
                            <td class="text-center" th:text="${pkgCourse['sort']}" th:attrappend="id='pkg-sort-'+${pkgCourse['id']}"></td>
                            <td class="text-center">
                                <a href="javascript:void(0)" th:attrappend="data-id=${pkgCourse['id']}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="修改排序">
                                    <i class="fa fa-crosshairs"></i>
                                </a>
                                <a th:if="${pkgCourse['required']}==1" th:attrappend="data-id=${pkgCourse['id']},id='pkg-status-action-'+${pkgCourse['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="取消必选">
                                    <i class="fa fa-toggle-on"></i>
                                </a>
                                <a th:if="${pkgCourse['required']}==2" th:attrappend="data-id=${pkgCourse['id']},id='pkg-status-action-'+${pkgCourse['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="设为必选">
                                    <i class="fa fa-toggle-off"></i>
                                </a>
                                <a th:if="${status}==0" th:attrappend="data-id=${pkgCourse['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="移除">
                                    <i class="fa fa-trash"></i>
                                </a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="pt10" th:if="!${#lists.isEmpty(packageCourseListMap[2])}" th:each="parentPackage : ${packageCourseListMap[2]}">
            <div class="panel panel-primary">
                <div class="panel-body">
                    <button th:if="${status}==0" type="button" class="btn btn-primary selectCourse" th:attrappend="data-select=${parentPackage['id']}">
                        <i class="fa fa-mouse-pointer"></i>&nbsp;选择此阶段课程
                    </button>
                    <span class="pull-right fs16" th:attrappend="data-id=${parentPackage['id']}" title="删除此阶段" style="cursor: pointer;">
                        <i class="fa fa-close"></i>
                    </span>
                    <div class="clearfix pt10">
                        <h5 th:text="${parentPackage['stageContext']}">阶段描述内容 </h5>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th class="text-center" width="10%">课程ID</th>
                                <th class="text-center" width="18%">课程名称</th>
                                <th class="text-center" width="18%">课程价格</th>
                                <th class="text-center" width="18%">课程状态</th>
                                <th class="text-center" width="18%">必选课</th>
                                <th class="text-center" width="18%">排序</th>
                                <th class="text-center" width="18%">操作</th>
                            </tr>
                            </thead>
                        </table>
                        <div class="J_V_tabContent table-xScrollWrap">
                            <table class="table table-bordered table-hover table-xs-content">
                                <tbody>
                                <tr class="jqgfirstrow" role="row">
                                    <th class="text-center" width="10%"></th>
                                    <th class="text-center" width="18%"></th>
                                    <th class="text-center" width="18%"></th>
                                    <th class="text-center" width="18%"></th>
                                    <th class="text-center" width="18%"></th>
                                    <th class="text-center" width="18%"></th>
                                    <th class="text-center" width="18%"></th>
                                </tr>
                                <tr th:if="${#lists.isEmpty(parentPackage['childList'])}">
                                    <td colspan="8" class="text-center">
                                        <div class="noDataTipsBox">
                                            <p><span class="c-4e fs16">亲，该阶段下还没有设置课程~~~</span></p>
                                        </div>
                                    </td>
                                </tr>
                                <tr th:if="!${#lists.isEmpty(parentPackage['childList'])}" th:each="pkgCourse : ${parentPackage['childList']}">
                                    <td class="text-center" th:text="${pkgCourse['course']['id']}"></td>
                                    <td class="text-center" th:text="${pkgCourse['course']['courseName']}"></td>
                                    <td class="text-center">
                                        <span class="pie" th:text="${pkgCourse['price']}" th:attrappend="id='pkg-price-'+${pkgCourse['id']}"></span>
                                    </td>
                                    <td class="text-center">
                                        <span th:if="${pkgCourse['course']['status']}==1">正常</span>
                                        <span th:if="${pkgCourse['course']['status']}==2">冻结</span>
                                        <span th:if="${pkgCourse['course']['status']}==3">删除</span>
                                    </td>
                                    <td class="text-center" th:text="${pkgCourse['required']}==1?'是':'否'" th:attrappend="id='pkg-required-'+${pkgCourse['id']}"></td>
                                    <td class="text-center" th:text="${pkgCourse['sort']}" th:attrappend="id='pkg-sort-'+${pkgCourse['id']}"></td>
                                    <td class="text-center">
                                        <a href="javascript:void(0)" th:attrappend="data-id=${pkgCourse['id']}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="修改排序">
                                            <i class="fa fa-crosshairs"></i>
                                        </a>
                                        <a th:if="${pkgCourse['required']}==1" th:attrappend="data-id=${pkgCourse['id']},id='pkg-status-action-'+${pkgCourse['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="取消必选">
                                            <i class="fa fa-toggle-on"></i>
                                        </a>
                                        <a th:if="${pkgCourse['required']}==2" th:attrappend="data-id=${pkgCourse['id']},id='pkg-status-action-'+${pkgCourse['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="设为必选">
                                            <i class="fa fa-toggle-off"></i>
                                        </a>
                                        <a th:if="${status}==0" th:attrappend="data-id=${pkgCourse['id']}" href="javascript:void(0)" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="移除">
                                            <i class="fa fa-trash"></i>
                                        </a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</html>